/*
 * ParticleDistribution.h
 *
 *  Created on: Jun 30, 2011
 *      Author: fqhuy
 */

#ifndef PARTICLEDISTRIBUTION_H_
#define PARTICLEDISTRIBUTION_H_

#include <QFile>
#include <QString>
#include <iostream>
#include <QTextStream>
#include <QStringList>
#include "Point3D.h"
#include "ParticleDistribution.h"

class ParticleDistribution {
public:
	ParticleDistribution(): data_(NULL), num_particles_(0){

	}
	ParticleDistribution(QString filename, const int& num_particles);
	virtual ~ParticleDistribution();
	inline int NumParticles(){
		return num_particles_;
	}

	inline int SetNumParticles(const int& num_particles){
		num_particles_ = num_particles;
	}

	inline Point3D<float>& operator[](const int& index){
		return data_[index];
	}

	inline ParticleDistribution& operator=(const ParticleDistribution& dist){
		if(data_)
			delete[] data_;
		//data_ = new Point3D<float>[dist.NumParticles()]();
		for(int i=0;i<num_particles_;i++){
			//data_[i] = dist[i];
		}
	}
private:
	int LoadFile(QFile* file);
	Point3D<float>* data_;
	int num_particles_;
};

#endif /* PARTICLEDISTRIBUTION_H_ */
